Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents

Application-Defined Routines

This section describes the callback routines you can define if you want your application to be automatically informed whenever an error, warning, or notice occurs during the execution of QuickDraw 3D routines.

TQ3ErrorMethod

You can define an error-handling function to handle errors that occur during the execution of QuickDraw 3D routines.

typedef void (*TQ3ErrorMethod) (
                     TQ3Error firstError,
                     TQ3Error lastError,
                     long reference);
firstError
A code that indicates the first error that occurred since the last time your error-handling function was called.
lastError
A code that indicates the most recent error that occurred.
reference
A long integer for your application's own use.

DESCRIPTION

Your TQ3ErrorMethod function is called whenever a QuickDraw 3D routine generates an error (fatal or otherwise) during its execution that QuickDraw 3D cannot handle internally. Your error-handling function should handle the error conditions indicated by the firstError and lastError parameters. If necessary, you can long jump out of your error method.

Your function must not call any QuickDraw 3D routines other than Q3Error_IsFatalError (which you can call to determine if the error was fatal). The reference parameter contains the long integer that you passed to Q3Error_Register when you registered your error handler. You can, for example, use that long integer to point to any data required by your error handler.

TQ3WarningMethod

You can define a function to handle warnings that occur during the execution of QuickDraw 3D routines.

typedef void (*TQ3WarningMethod) (
                     TQ3Warning firstWarning,
                     TQ3Warning lastWarning,
                     long reference);
firstWarning
A code that indicates the first warning that occurred since the last time your warning-handling function was called.
lastWarning
A code that indicates the most recent warning that occurred.
reference
A long integer for your application's own use.

DESCRIPTION

Your TQ3WarningMethod function is called whenever a QuickDraw 3D routine generates a warning during its execution that QuickDraw 3D cannot handle internally. Your warning-handling function should handle the warning conditions indicated by the firstWarning and lastWarning parameters. Your function must not call any QuickDraw 3D routines. The reference parameter contains the long integer that you passed to Q3Warning_Register when you registered your warning handler. You can, for example, use that long integer to point to any data required by your warning handler.

TQ3NoticeMethod

You can define a function to handle notices that occur during the execution of QuickDraw 3D routines.

typedef void (*TQ3NoticeMethod) (
                     TQ3Notice firstNotice,
                     TQ3Notice lastNotice,
                     long reference);
firstNotice
A code that indicates the first notice that occurred since the last time your notice-handling function was called.
lastNotice
A code that indicates the most recent notice that occurred.
reference
A long integer for your application's own use.

DESCRIPTION

Your TQ3NoticeMethod function is called whenever a QuickDraw 3D routine generates a notice during its execution that QuickDraw 3D cannot handle internally. Your notice-handling function should handle the notice conditions indicated by the firstNotice and lastNotice parameters. Your function must not call any QuickDraw 3D routines. The reference parameter contains the long integer that you passed to Q3Notice_Register when you registered your notice handler. You can, for example, use that long integer to point to any data required by your notice handler.

 

 

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents